<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>备注信息</title>
    <link href="/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/ace.min.css"/>
    <link href="/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link href="/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/Public/admin/css/gxxj/normalize.css">

    <style type="text/css">
        .span_right {
            float: right;
        }

        .down-menu {
            height: 35px;
            line-height: 35px;
        }

        .search_div {
            background: none;
            border: none;
            width: 450px !important;
        }

        .m-search {
            display: flex;
            margin-left: 30px;
        }

        .outbound {
            display: inline-block;
            /*float: left;*/
            text-align: center;

        }
    </style>


    <link rel="stylesheet" href="/Public/admin/css/gxxj/public_O.css">
    <link rel="stylesheet" href="/Public/admin/css/gxxj/knomledge.css">
    <style type="text/css">
        html {
            background: #fff;
            height: 100%;
        }
    </style>
</head>
<body style="padding:10px;">
<!--<textarea rows="3" style="width: 100%;display: block" class="input_bg_color msg_content" name="title" id="title" placeholder="请输入快速回复"></textarea>-->

<!--<a class="btn btn-primary" style="margin: 5px; font-size: smaller; background-color:#6254B2" onclick="add_title()">添加快速回复</a> <span style="font-size: smaller;color: #cd0a0a"> 谨慎添加</span>-->
<!--<hr>-->

<div class="main">
    <div class="outbound" id="div_content">
        <volist name="data" id="vo">

                 <span class="btn btn-success btn-rounded" style="margin: 5px" id="t_id<{$vo.id}>" onclick="click_feedback('<{$vo.id}>')"><{$vo.title}></span>

        </volist>
    </div>
</div>


<script src="/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/js/content.js?v=1.0.0"></script>
<script src="/Public/admin/js/layer/layer.js"></script>
<script src="/Public/admin/js/layui/layui.js"></script>
<script>

    function click_feedback(id) {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        var title = $('#t_id'+id).text();
        console.log(title);

        if (title == "") {
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }

        var page_first = "<{$page_first}>";
        var type1 = "<{$url_type}>";
        var page = "<{$page}>";
        var url_type_status = "<{$url_type_status}>";

        var vid = "<{$vid}>";
        var url = "<{$SRVER_NAME}>/admin.php/Temp/outbound_result";

        $.post(url, {vid: vid,content:title,type1:type1,quick_status:'1'}, function (data) {
            if (data.code == "1001") {
                layer.alert(data.result, {title: '提示框', icon: 1}, function () {

                    var index1 = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index1);
//                    window.location.href = url;
//                    parent.location.reload(to_url);
                });
            }
            else {
                layer.alert(data.result, {title: '提示框', icon: 2});

            }
        });
        layer.close(index);
    }

    function add_title() {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        var title = $("#title").val();
        if (title == "") {
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }
        var page_first = "<{$page_first}>";
        var type1 = "<{$url_type}>";
        var page = "<{$page}>";
        var url_type_status = "<{$url_type_status}>";

        var vid = "<{$vid}>";
        var url = "<{$SRVER_NAME}>/admin.php/AntiUser/Quick_answer";
        var to_url = "<{$SRVER_NAME}>/admin.php/AntiUser/anti_user_list?page_first=" + page_first + "&page=" + page + "&type=" + type1 + "&url_type_status=" + url_type_status;
        $.post(url, {title: title}, function (data) {
            if (data.code == "1001") {
                layer.alert(data.result, {title: '提示框', icon: 1}, function () {

//                    var index1 = parent.layer.getFrameIndex(window.name);
//                    parent.layer.close(index1);
                    window.location.href = url+"?vid="+vid;
//                    parent.location.reload(to_url);

                });
            }
            else {
                layer.alert(data.result, {title: '提示框', icon: 2});

            }
        });
        layer.close(index);
    }


</script>
</body>
</html>